<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/zixu_eleven.css"/>
		<link rel="stylesheet" type="text/css" href="../css/reset.css"/>
	</head>
	<body>
		<header class="header">
			<div class="top_red"> 					
				<img src="../img/fh.png" class="fh"/>
				<span class="text">注册</span>
				<img src="../img/qx.png" class="qx"/>
			</div>
		</header>
		
		<section class="section">
			<p class="zh">
				用&nbsp;&nbsp;户&nbsp;&nbsp;名:
				<input type="text" placeholder="邮件名或手机号" id="in1"/>
			</p>
			<p class="mm">
				密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:
				<input type="text" placeholder="请输入6-12位密码" id="in2"/>
			</p>
			<p class="mm">
				确认密码:
				<input type="text" placeholder="请再次输入密码" id="in3"/>
			</p>
			
			<button class="dl_btn" id="dl_btnty">
				<span>同意服务协议并同意</span>
			</button>
		</section>
		
		<script src="../../03.25_test/js/jquery-2.2.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../03.25_test/js/flexible_css.debug.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../03.25_test/js/flexible.debug.js" type="text/javascript" charset="utf-8"></script>
		
		
		<script type="text/javascript">
			var dl_btnty = document.getElementById("dl_btnty");
			dl_btnty.onclick = function  () {
				var in1 = document.getElementById("in1").value;
				var in2 = document.getElementById("in2").value;
				var in3 = document.getElementById("in3").value;
				
				var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
				var mima = /[a-zA-Z0-9]{6,10}/;
				
				if (reg.exec(in1)) {
					if (mima.exec(in2)) {
						if (in2 == in3) {
							alert("注册成功");
						} else{
							alert("密码和确认密码填写不一致，请重新输入");
						}						
					} else{
						alert("密码输入格式不正确，请重新输入");
					}
				} else{
					alert("邮件名/手机号、密码和确认密码均要填写，请输入");
				}
			}
		</script>
		<script type="text/javascript">
			$(".qx").on("click",function () {
				location.href = 'zixu_ten.html';	
			})
			$(".fh").on("click",function () {
				location.href = 'zixu_ten.html';	
			})
		</script>
	</body>
</html>
